package com.firefly.service.command.shop;

import com.firefly.dao.dao.shop.po.AreaPo;
import com.firefly.dao.assembler.shop.AreaAssembler;
import com.firefly.dao.dto.shop.AreaDto;
import com.firefly.service.repository.shop.AreaRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author: lzg(萤火科技 ： 854378082 @ qq.com)
 * @date: 2023/2/1
 **/
@Service
public class AreaCommand {
    private final AreaRepository areaRepository;
    private final AreaAssembler areaAssembler;
    @Autowired
    public AreaCommand(AreaRepository areaRepository,AreaAssembler areaAssembler){
        this.areaRepository = areaRepository;
        this.areaAssembler = areaAssembler;
    }
    // 更新显示状态
    public Boolean updateDisplay(AreaDto request){
        AreaPo entity = areaAssembler.getPo(request);
        return areaRepository.updateDisplay(entity);
    }
}
